<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title></title>
</head>
<body>
    <canvas id="canvas" width="500" height="500"></canvas>

    <script>
        var canvas = document.getElementById('canvas');
        var context = canvas.getContext('2d');
        context.font = '40pt Arial';
        context.fillStyle = 'orange';
        context.strokeStyle = 'red';
        context.fillText('Hello world',canvas.width/2-150,canvas.height/2+15);
        context.strokeText('Hello world',canvas.width/2-150,canvas.height/2+15);
    </script>
</body>
</html>